package edu.sctu.practice.class01.zhangwang.day2015_10_08.text04;

/**
 * Created by Z_W on 2015/10/9.
 */
public class Number {
    private int n1;
    private int n2;

    public Number(int n1,int n2){
        this.n1 = n1;
        this.n2 = n2;
    }

    public int additon(){
        return n1+n2;
    }

    public int suntration(){
        return n1-n2;
    }

    public int multiplication(){
        return n1*n2;
    }

    public int division(){
        int a = 0;
        if (n2!=0){
            a = n1/n2;
        }else {
            System.out.println("被除数不能为0！");
        }
        return a;
    }

}
